<?php
namespace app\face\controller;
use app\admin\controller\Base;
use think\Controller; 
use think\Db;
use think\Log;
use app\service\wotuService;
use app\service\appletService;
class H5 extends Base
{
	//智能门禁
	public function door()
	{
		session("url",request()->url());
		return $this->fetch();
	}

	//账单详情
	public function billdetail()
	{
		session("url",request()->url());
		$user_id=session("user_id");
		$bindroom=Db::table("room")->where("user_id",$user_id)->find();
		$roominfo=Db::table("roominfo")->where("id",$bindroom["id"])->find();
		$billlis = (new appletService())->billRoomIdList($roominfo['out_room_id']);
		
		if(empty($billlis)){
			return $this->fetch("nopaymsg");
		}
		$billlist = (new appletService())->cost_type($roominfo['out_room_id']);
		
		//var_dump($roominfo);die;
		$this->assign("userinfo",$userinfo);
		$this->assign("billlist",$billlis);
		$this->assign("roominfo",$roominfo);
		return $this->fetch();
	}


}